<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>付款流程系统 - 平台分账与推广结算</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
        }
        
        :root {
            --primary: #3498db;
            --secondary: #2ecc71;
            --accent: #9b59b6;
            --light: #f8f9fa;
            --dark: #2c3e50;
            --gray: #7f8c8d;
            --border: #e0e0e0;
            --warning: #f39c12;
            --danger: #e74c3c;
            --text: #34495e;
        }
        
        body {
            font-size: 14px;
            color: var(--text);
            line-height: 1.6;
            background: #f5f7fa;
            min-height: 100vh;
            padding: 0 15px 80px;
        }
        
        .container {
            max-width: 750px;
            margin: 0 auto;
        }
        
        .header {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            color: white;
            padding: 20px 15px;
            border-radius: 0 0 20px 20px;
            margin-bottom: 20px;
            text-align: center;
        }
        
        .header h1 {
            font-size: 22px;
            margin-bottom: 10px;
        }
        
        .header p {
            opacity: 0.9;
            font-size: 14px;
        }
        
        .transaction-card {
            background: white;
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            margin-bottom: 20px;
        }
        
        .card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border);
        }
        
        .card-header h2 {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
        }
        
        .card-header h2 i {
            margin-right: 10px;
            color: var(--primary);
        }
        
        .transaction-id {
            font-size: 12px;
            color: var(--gray);
            background: #f8f9fa;
            padding: 3px 10px;
            border-radius: 12px;
        }
        
        .transaction-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
        }
        
        .info-item {
            text-align: center;
        }
        
        .info-label {
            font-size: 12px;
            color: var(--gray);
            margin-bottom: 5px;
        }
        
        .info-value {
            font-size: 16px;
            font-weight: 600;
        }
        
        .amount-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--secondary);
        }
        
        .flow-timeline {
            position: relative;
            padding: 20px 0;
            margin: 30px 0;
        }
        
        .flow-timeline::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 100%;
            background: var(--border);
        }
        
        .flow-step {
            position: relative;
            display: flex;
            justify-content: space-between;
            margin-bottom: 40px;
        }
        
        .flow-step:last-child {
            margin-bottom: 0;
        }
        
        .step-card {
            width: 45%;
            background: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
            position: relative;
        }
        
        .step-card.left {
            border-left: 4px solid var(--primary);
        }
        
        .step-card.right {
            border-left: 4px solid var(--accent);
        }
        
        .step-icon {
            position: absolute;
            top: -15px;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px;
        }
        
        .step-icon.left {
            left: -15px;
            background: var(--primary);
        }
        
        .step-icon.right {
            right: -15px;
            background: var(--accent);
        }
        
        .step-title {
            font-weight: 600;
            margin-bottom: 8px;
        }
        
        .step-desc {
            font-size: 12px;
            color: var(--gray);
            margin-bottom: 10px;
        }
        
        .step-amount {
            font-weight: 700;
            text-align: right;
        }
        
        .distribution-card {
            background: white;
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            margin-bottom: 20px;
        }
        
        .distribution-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .distribution-header h2 {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
        }
        
        .distribution-header h2 i {
            margin-right: 10px;
            color: var(--primary);
        }
        
        .distribution-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
            border-bottom: 1px solid var(--border);
        }
        
        .distribution-item:last-child {
            border-bottom: none;
        }
        
        .dist-info {
            flex: 1;
        }
        
        .dist-title {
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .dist-desc {
            font-size: 12px;
            color: var(--gray);
        }
        
        .dist-amount {
            font-weight: 700;
            min-width: 80px;
            text-align: right;
        }
        
        .positive {
            color: var(--secondary);
        }
        
        .negative {
            color: var(--danger);
        }
        
        .summary-card {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            border-radius: 16px;
            padding: 20px;
            color: white;
            margin-bottom: 20px;
        }
        
        .summary-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .summary-title i {
            margin-right: 10px;
        }
        
        .summary-item {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
        }
        
        .summary-label {
            opacity: 0.9;
        }
        
        .summary-value {
            font-weight: 700;
            font-size: 16px;
        }
        
        .history-card {
            background: white;
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }
        
        .history-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .history-header h2 {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
        }
        
        .history-header h2 i {
            margin-right: 10px;
            color: var(--primary);
        }
        
        .history-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
        }
        
        .history-item:last-child {
            border-bottom: none;
        }
        
        .history-info {
            flex: 1;
        }
        
        .history-title {
            font-weight: 500;
            margin-bottom: 3px;
        }
        
        .history-date {
            font-size: 12px;
            color: var(--gray);
        }
        
        .history-amount {
            font-weight: 600;
            color: var(--secondary);
        }
        
        .status-badge {
            font-size: 12px;
            padding: 3px 8px;
            border-radius: 10px;
            margin-left: 10px;
        }
        
        .status-completed {
            background: #d1fae5;
            color: #047857;
        }
        
        .status-pending {
            background: #fef3c7;
            color: #b45309;
        }
        
        .footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            display: flex;
            padding: 15px;
            box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
            max-width: 750px;
            margin: 0 auto;
        }
        
        .btn {
            flex: 1;
            padding: 14px;
            border-radius: 12px;
            border: none;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
            margin-right: 10px;
        }
        
        .btn-primary {
            background: var(--primary);
            color: white;
        }
        
        .percentage-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            background: #e0f7fa;
            color: var(--primary);
            font-size: 12px;
            margin-left: 5px;
        }
        
        @media (max-width: 480px) {
            .flow-step {
                flex-direction: column;
            }
            
            .step-card {
                width: 100%;
                margin-bottom: 30px;
            }
            
            .step-card.left {
                margin-right: 0;
            }
            
            .step-card.right {
                margin-left: 0;
            }
            
            .step-icon.left {
                left: -15px;
            }
            
            .step-icon.right {
                right: auto;
                left: -15px;
            }
            
            .footer {
                flex-direction: column;
                gap: 10px;
            }
            
            .btn-outline {
                margin-right: 0;
                margin-bottom: 5px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1><i class="fas fa-money-bill-wave"></i> 付款流程系统</h1>
            <p>交易分账与推广结算流程</p>
        </div>
        
        <div class="transaction-card">
            <div class="card-header">
                <h2><i class="fas fa-receipt"></i> 交易详情</h2>
                <div class="transaction-id">订单号: TX20230731001</div>
            </div>
            
            <div class="transaction-info">
                <div class="info-item">
                    <div class="info-label">交易时间</div>
                    <div class="info-value">2023-07-31 14:30:22</div>
                </div>
                <div class="info-item">
                    <div class="info-label">交易状态</div>
                    <div class="info-value" style="color: var(--secondary);">已完成</div>
                </div>
                <div class="info-item">
                    <div class="info-label">交易金额</div>
                    <div class="amount-value">¥2,800.00</div>
                </div>
            </div>
            
            <div class="transaction-info">
                <div class="info-item">
                    <div class="info-label">服务项目</div>
                    <div class="info-value">网站设计与开发</div>
                </div>
                <div class="info-item">
                    <div class="info-label">服务商</div>
                    <div class="info-value">张设计师</div>
                </div>
            </div>
        </div>
        
        <div class="flow-timeline">
            <div class="flow-step">
                <div class="step-card left">
                    <div class="step-icon left">
                        <i class="fas fa-user"></i>
                    </div>
                    <div class="step-title">用户付款</div>
                    <div class="step-desc">客户支付服务费用到平台账户</div>
                    <div class="step-amount">¥2,800.00</div>
                </div>
                <div class="step-card right">
                    <div class="step-icon right">
                        <i class="fas fa-lock"></i>
                    </div>
                    <div class="step-title">平台托管</div>
                    <div class="step-desc">平台暂存交易金额，等待服务完成</div>
                    <div class="step-amount">¥2,800.00</div>
                </div>
            </div>
            
            <div class="flow-step">
                <div class="step-card left">
                    <div class="step-icon left">
                        <i class="fas fa-check-circle"></i>
                    </div>
                    <div class="step-title">服务完成</div>
                    <div class="step-desc">客户确认服务完成，满意验收</div>
                    <div class="step-amount"></div>
                </div>
                <div class="step-card right">
                    <div class="step-icon right">
                        <i class="fas fa-cogs"></i>
                    </div>
                    <div class="step-title">分账处理</div>
                    <div class="step-desc">平台计算服务费与推广佣金</div>
                    <div class="step-amount"></div>
                </div>
            </div>
            
            <div class="flow-step">
                <div class="step-card left">
                    <div class="step-icon left">
                        <i class="fas fa-user-tie"></i>
                    </div>
                    <div class="step-title">服务商结算</div>
                    <div class="step-desc">平台打款给服务商</div>
                    <div class="step-amount">¥2,380.00</div>
                </div>
                <div class="step-card right">
                    <div class="step-icon right">
                        <i class="fas fa-share-alt"></i>
                    </div>
                    <div class="step-title">推广结算</div>
                    <div class="step-desc">平台结算推广佣金给推广用户</div>
                    <div class="step-amount">¥280.00</div>
                </div>
            </div>
        </div>
        
        <div class="distribution-card">
            <div class="distribution-header">
                <h2><i class="fas fa-percentage"></i> 资金分配详情</h2>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">交易总金额</div>
                </div>
                <div class="dist-amount">¥2,800.00</div>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">服务商结算 <span class="percentage-badge">85%</span></div>
                    <div class="dist-desc">打款给服务提供者</div>
                </div>
                <div class="dist-amount positive">¥2,380.00</div>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">平台服务费 <span class="percentage-badge">10%</span></div>
                    <div class="dist-desc">平台运营成本</div>
                </div>
                <div class="dist-amount negative">¥280.00</div>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">推广佣金 <span class="percentage-badge">5%</span></div>
                    <div class="dist-desc">结算给推广用户</div>
                </div>
                <div class="dist-amount positive">¥140.00</div>
            </div>
        </div>
        
        <div class="summary-card">
            <h2 class="summary-title"><i class="fas fa-file-invoice-dollar"></i> 结算摘要</h2>
            
            <div class="summary-item">
                <div class="summary-label">服务商实收金额</div>
                <div class="summary-value">¥2,380.00</div>
            </div>
            
            <div class="summary-item">
                <div class="summary-label">推广用户佣金</div>
                <div class="summary-value">¥140.00</div>
            </div>
            
            <div class="summary-item">
                <div class="summary-label">平台服务费收入</div>
                <div class="summary-value">¥140.00</div>
            </div>
            
            <div class="summary-item" style="margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.3);">
                <div class="summary-label">结算状态</div>
                <div class="summary-value">已完成</div>
            </div>
        </div>
        
        <div class="distribution-card">
            <div class="distribution-header">
                <h2><i class="fas fa-users"></i> 推广用户结算</h2>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">李推广员</div>
                    <div class="dist-desc">ID: PROMO001 | 推广佣金: 5%</div>
                </div>
                <div class="dist-amount positive">¥140.00</div>
            </div>
            
            <div class="distribution-item">
                <div class="dist-info">
                    <div class="dist-title">结算状态</div>
                    <div class="dist-desc">已结算到推广员钱包</div>
                </div>
                <div class="dist-amount" style="color: var(--secondary);">已完成</div>
            </div>
        </div>
        
        <div class="history-card">
            <div class="history-header">
                <h2><i class="fas fa-history"></i> 最近结算记录</h2>
            </div>
            
            <div class="history-item">
                <div class="history-info">
                    <div class="history-title">网站设计服务 <span class="status-badge status-completed">已完成</span></div>
                    <div class="history-date">2023-07-30 10:15:07</div>
                </div>
                <div class="history-amount">¥1,200.00</div>
            </div>
            
            <div class="history-item">
                <div class="history-info">
                    <div class="history-title">APP开发服务 <span class="status-badge status-completed">已完成</span></div>
                    <div class="history-date">2023-07-28 16:45:33</div>
                </div>
                <div class="history-amount">¥4,500.00</div>
            </div>
            
            <div class="history-item">
                <div class="history-info">
                    <div class="history-title">UI/UX设计 <span class="status-badge status-completed">已完成</span></div>
                    <div class="history-date">2023-07-25 09:30:22</div>
                </div>
                <div class="history-amount">¥3,200.00</div>
            </div>
        </div>
    </div>
    
    <div class="footer">
        <button class="btn btn-outline">
            <i class="fas fa-download"></i> 下载结算单
        </button>
        <button class="btn btn-primary">
            <i class="fas fa-check-circle"></i> 确认结算
        </button>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 模拟结算流程动画
            const flowSteps = document.querySelectorAll('.flow-step');
            let delay = 300;
            
            flowSteps.forEach((step, index) => {
                setTimeout(() => {
                    step.style.opacity = "1";
                    step.style.transform = "translateY(0)";
                }, delay * index);
                
                // 初始状态
                step.style.opacity = "0";
                step.style.transform = "translateY(20px)";
                step.style.transition = "all 0.5s ease";
            });
            
            // 确认结算按钮
            const confirmBtn = document.querySelector('.btn-primary');
            confirmBtn.addEventListener('click', function() {
                const originalText = confirmBtn.innerHTML;
                confirmBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 处理中...';
                confirmBtn.disabled = true;
                
                setTimeout(() => {
                    confirmBtn.innerHTML = '<i class="fas fa-check-circle"></i> 结算成功';
                    confirmBtn.style.background = '#2ecc71';
                    
                    // 更新状态
                    document.querySelector('.summary-item:last-child .summary-value').textContent = "已结算";
                    
                    // 添加新的结算记录
                    const historyList = document.querySelector('.history-card');
                    const now = new Date();
                    const dateStr = `${now.getFullYear()}-${String(now.getMonth()+1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
                    
                    const newItem = document.createElement('div');
                    newItem.className = 'history-item';
                    newItem.innerHTML = `
                        <div class="history-info">
                            <div class="history-title">网站设计与开发 <span class="status-badge status-completed">已完成</span></div>
                            <div class="history-date">${dateStr}</div>
                        </div>
                        <div class="history-amount">¥2,800.00</div>
                    `;
                    
                    historyList.insertBefore(newItem, historyList.firstChild.nextSibling);
                }, 2000);
            });
        });
    </script>
</body>
</html>